Skip to content

test(e2e): fix stale bootstrap call-count assertions left by #117 - #124

Merged
emp3thy merged 1 commit into
mainfrom
fix/e2e-bootstrap-call-count
Jul 31, 2026
Merged

test(e2e): fix stale bootstrap call-count assertions left by #117#124
emp3thy merged 1 commit into
mainfrom
fix/e2e-bootstrap-call-count

Conversation

@emp3thy

@emp3thy emp3thy commented Jul 31, 2026

Copy link
Copy Markdown
Owner

main is currently red.

tests/e2e/test_agentcore_journey.py::test_j2_session_bootstrap_hook_reaches_agentcore fails with assert 4 == 3.

Cause

PR #117 (issue #109) changed session_bootstrap to fan out the semantic count over both the project and general namespaces, so ListMemoryRecords goes from 3 calls to 4. That PR correctly updated its unit test (test_session_bootstrap_fires_3_parallel_list_calls..._4_...) but missed the hard-coded counts in the J2 journey test.

The 4-call shape is the intended behaviour, so this updates the stale assertions rather than reverting the code:

assertion before after
len(lists) 3 4
len(fake.requests) 3 4
episodic leg (EPI-FAKE-0001) 2 2 (unchanged)
semantic leg (SEM-FAKE-0001) 1 2

Why CI missed it

No workflow runs tests/e2e — the set is bugbot, docs, typecheck and ui-tests. All three checks on #117 were green and it merged with main left broken. The break only surfaced on a full local run.

Worth a follow-up: either add an e2e job, or accept that call-count changes need a manual tests/e2e grep. Happy to open a separate issue.

Verification

  • tests/e2e/test_agentcore_journey.py — 8 passed
  • tests/e2e (full) — 72 passed, 5 skipped

Test-only change; no production code touched.

🤖 Generated with Claude Code

PR #117 (issue #109) changed session_bootstrap to fan out the semantic
count over both the project and general namespaces, taking the
ListMemoryRecords call count from 3 to 4. It updated the unit test in
test_agentcore_unit.py but missed the hard-coded counts in the J2
journey test, leaving main red.

The 4-call shape is the intended behaviour, so this updates the stale
assertions rather than the code: total calls 3 -> 4, and the semantic
leg 1 -> 2 (project + general). The episodic leg stays at 2.

CI did not catch this because no workflow runs tests/e2e -- only
bugbot, docs, typecheck and ui-tests. Worth a follow-up.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Claude BugBot Analysis

This diff only updates test assertions in test_agentcore_journey.py to expect 4 ListMemoryRecords calls (2 episodic + 2 semantic) instead of 3. Verified against the actual session_bootstrap implementation in better_memory/storage/agentcore.py, which fans out semantic queries over both the project and general namespaces — the updated counts and comment accurately reflect that behavior, so no bug was found in the changed lines.

No bugs were detected in this PR.

@emp3thy
emp3thy merged commit b2b61a8 into main Jul 31, 2026
2 checks passed
@emp3thy
emp3thy deleted the fix/e2e-bootstrap-call-count branch July 31, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant